/**
* @author: mingyi
* @date: 2012/10/03
* @description: uglify config
**/

var jsp = require("uglify-js").parser;
var pro = require("uglify-js").uglify;

module.exports = function(orig_code){
  var ast = jsp.parse(orig_code);
  ast = pro.ast_mangle(ast, {'except': ['require', 'exports', 'module']});    
  ast = pro.ast_squeeze(ast);
  var final_code = pro.gen_code(ast, {'ascii_only': true});
  return final_code;
}
